package com.lkm.market2_0.task;

import com.lkm.frame.task2.ITaskExecutor;
import com.lkm.frame.task2.TaskAdapter;
import com.lkm.frame.task2.TaskManager;
import com.lkm.javatool.lang.RunnablePR;




public abstract class AsyncTask2<P,PR,R>  extends TaskAdapter<P,PR,R>  {

    public AsyncTask2(ITaskExecutor<P, PR, R> taskExecutor, String id, TaskManager mTaskManager) {
        super(taskExecutor, id, mTaskManager);
    }

    @Override
    public void doExecuting(P param) {
        super.doExecuting(param);


        mTaskExecutor.executor(new RunnablePR<P, Void>() {
            @Override
            public Void run(P o) {
                doAsyncExecuting(o);
                return null;
            }
        },param);
    }


    protected abstract void doAsyncExecuting(P param);
}
